<template>
  <div>
    <h1>我是父组件App</h1>
    <Header></Header>
    <Footer></Footer>
  </div>
</template>

<script>
import Footer from "./components/Footer.vue";
import Header from "./components/Header.vue";
export default {
  name: "",
  components: {
    Header,
    Footer,
  },
  mounted() {
    this.$bus.$on('huazi',(huazi)=>{
        console.log('爷爷组件',huazi )
    })
  },
};
</script>

<style scoped>
div {
  width: 800px;
  height: 600px;
  background: skyblue;
  margin: 20px auto;
}
</style>
